<!DOCTYPE html>
<html>
  <head>
    <title>Webdir</title>
    <%= stylesheet_link_tag @page["styles"] %>
    <%= javascript_include_tag @page["scripts"] %>
    <script type="text/javascript">
      <%#*$(document).ready(function () {%>
        <%#*$.validator.addMethod(%>
        <%#*"regex",%>
        <%#*function(value, element, regexp) {%>
          <%#*var check = false;%>
          <%#*return this.optional(element) || regexp.test(value);%>
        <%#*},%>
        <%#*"Please check your input."%>
      <%#*);%>
        <%#*$(".edit_social_network").validate({%>
          <%#*debug: true,%>
          <%#*rules: {"social_network[SkypeName]": {minlength : 1 , maxlength : 20}%>
            <%#*, "social_network[CubeLocation]": {minlength : 3 , maxlength : 20}%>
          <%#*}%>
        <%#*});%>
      <%#*});%>


      <%#*$(document).ready(function () {%>
        <%#*$.validator.addMethod(%>
        <%#*"regex",%>
        <%#*function(value, element, regexp) {%>
          <%#*var check = false;%>
          <%#*return this.optional(element) || regexp.test(value);%>
        <%#*},%>
        <%#*"Please check your input."%>
      <%#*);%>
        <%#*$(".edit_social_network").validate({%>
          <%#*debug: true,%>
          <%#*rules: {%>
            <%#*"social_network[SkypeName]": {minlength : 1 , maxlength : 20, required : true, regex : /^[\d\s]+$/}%>
          <%#*}%>
        <%#*});%>
      <%#*});%>
    </script>
    <%= csrf_meta_tag %>
  </head>
  <body>

    <%= yield %>

  </body>
</html>
